const mix = require('laravel-mix');
const webpack = require('webpack');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.setPublicPath('public/asset/h5').setResourceRoot('/asset/h5');

mix.copy('resources/h5/img', 'public/asset/h5/img');

mix.js('resources/h5/app.js', 'public/asset/h5')
    .vue().extract(['vue']).version().sourceMaps();

mix.sass('resources/sass/app.scss', 'public/asset/h5/css')
    .version();
